<?php

/**
 * LypoStatement form base class.
 *
 * @package    form
 * @subpackage lypo_statement
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 15484 2009-02-13 13:13:51Z fabien $
 */
class BaseLypoStatementForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'               => new sfWidgetFormInputHidden(),
      'text'             => new sfWidgetFormTextarea(),
      'for_registration' => new sfWidgetFormInputCheckbox(),
      'youtube_code'     => new sfWidgetFormInput(),
      'vimeo_code'       => new sfWidgetFormInput(),
      'dailymotion_code' => new sfWidgetFormInput(),
      'reaction_count'   => new sfWidgetFormInput(),
      'num_respects'     => new sfWidgetFormInput(),
      'sortorder'        => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'id'               => new sfValidatorPropelChoice(array('model' => 'LypoStatement', 'column' => 'id', 'required' => false)),
      'text'             => new sfValidatorString(array('required' => false)),
      'for_registration' => new sfValidatorBoolean(array('required' => false)),
      'youtube_code'     => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'vimeo_code'       => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'dailymotion_code' => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'reaction_count'   => new sfValidatorInteger(array('required' => false)),
      'num_respects'     => new sfValidatorInteger(array('required' => false)),
      'sortorder'        => new sfValidatorInteger(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('lypo_statement[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'LypoStatement';
  }


}
